package ru.susu.algebra.partition.polyhedron.checkers;

import ru.susu.algebra.operation.IOperation;

/**
 * @author akargapolov
 * @since: 11.03.2010
 */
public class SecondVertexIncludesCheckerOp implements IOperation<Boolean>
{

	@Override
	public Boolean performOperation(Object... sources)
	{
		Integer[] v1 = (Integer[])sources[0];
		Integer[] v2 = (Integer[])sources[1];

		for (int i = 0; i < v1.length; i++)
			if (v1[i] == 0 && v2[i] != 0)
				return false;
		return true;
	}

}
